feat(ci): add PyPI publish workflow#14
Conversation
…olicy - Centered tagline + 6 shields (PyPI, Python, CI, Coverage, License, Privacy) - Add "What is iotcli?" section with key principles - Add Demo section with list/status/JSON examples - Add Architecture overview with directory tree - Expand AI Agent Integration with clearer MCP/skill/workflow sections - Add PRIVACY.md: local-only data, Fernet encryption, no telemetry - Fix duplicate device lookup line in control.py (post-merge artifact)
Greptile SummaryThis PR adds a GitHub Actions workflow ( Key changes:
Remaining concern:
|
| Filename | Overview |
|---|---|
| .github/workflows/publish.yml | Adds a PyPI Trusted Publishing workflow triggered on v* tags. Previous issues (mutable pypa action tag, static version, actor guard) have been resolved. Minor remaining concern: actions/checkout@v4 and actions/setup-python@v5 are still mutable tags. |
Sequence Diagram
sequenceDiagram
participant Dev as Developer
participant GH as GitHub Actions
participant Env as pypi Environment
participant PyPI as PyPI (OIDC)
Dev->>GH: git push tag v*
GH->>GH: Trigger publish workflow
GH->>Env: Request environment approval
Env-->>GH: Approved by reviewer
GH->>GH: actions/checkout
GH->>GH: sed version from tag into pyproject.toml
GH->>GH: actions/setup-python
GH->>GH: pip install build
GH->>GH: python -m build (wheel + sdist)
GH->>PyPI: pypa/gh-action-pypi-publish (OIDC token exchange)
PyPI-->>GH: Publish confirmed
Reviews (6): Last reviewed commit: "fix(ci): remove hardcoded actor guard — ..." | Re-trigger Greptile
|
@greptile review |
|
@greptile review |
|
@greptile review |
|
@greptile review |
|
@greptile review |
Summary
Adds an automated PyPI publish workflow using Trusted Publishing (OIDC) — no long-lived API tokens required.
How It Works
Setup Required (repo admin)
1. GitHub Environment
2. PyPI Trusted Publisher
(create the project first at https://pypi.org/manage/projects/ if it doesn't exist)
No API token secret is needed. OIDC handles authentication automatically.
3. Tag Protection (recommended)
Create a GitHub Ruleset restricting `v*` tag creation to admins so only owners can trigger releases.
Security
🤖 Generated with Claude Code